package servlet;

import core.ServletBase;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created by taohj on 2014/12/18.
 */
@WebServlet("/indexServlet")
public class IndexServlet extends ServletBase {


    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doPost(req, resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

      /*  System.out.println("------indexServlet-------------");*/
        req.getRequestDispatcher("WEB-INF/page/index.jsp").forward(req,resp);
    }

    @Override
    public void init() throws ServletException {
        System.out.println(this.getClass().getName()+"-----init");
    }
}
